<script>
export default {
  onShareAppMessage(res) {
    return {
      title: '考神临门',
      imageUrl: '/static/img/logo.png'
    };
  },
  onShareTimeline() {
    return {
      title: '考神临门',
      imageUrl: '/static/img/logo.png'
      //分享朋友圈的参数
    };
  },
  data() {
    return {
      isIPhone: true,
      isIPhone2: false,
      liuhai: 0,
      menu: {}
    };
  },
  onLaunch: function () {
    this.menu = uni.getMenuButtonBoundingClientRect({});
    // console.log('导航栏的高度', this.menu);
    uni.getSystemInfo({
      success: (res) => {
        console.log(res);
        // if (res.model.includes('iPhone') && res.statusBarHeight > 20) {
        //   this.isIPhone = true;
        //   this.liuhai = res.statusBarHeight;
        // }
        if (res.model.includes('iPhone') && res.statusBarHeight > 20) {
          this.isIPhone2 = true;
          this.liuhai = res.statusBarHeight;
        }
        // this.liuhai = res.statusBarHeight;
        this.liuhai = res.statusBarHeight + (this.menu.top - res.statusBarHeight);
        console.log(this.menu.top, this.liuhai);
      }
    });
  },
  mounted() {
    uni.showShareMenu({
      withShareTicket: true,
      menus: ['shareAppMessage', 'shareTimeline']
    });
  }
};
</script>

<style lang="scss">
@import 'uview-ui/index.scss';
/*每个页面公共css */
@import '@/uni_modules/uni-scss/index.scss';
/* #ifndef APP-NVUE */
@import '@/static/customicons.css';
// 设置整个项目的背景色
// page {
// 	background-color: #f5f5f5;
// }

/* #endif */
.example-info {
  font-size: 14px;
  color: #333;
  padding: 10px;
}
::-webkit-scrollbar {
  width: 0;
  height: 0;
  color: transparent;
  display: none;
}
// 消除考神临门页面的闪烁bug问题
// .u-dropdown__content {
//   z-index: 1 !important;
// }
// .u-dropdown__content__mask {
//   z-index: 1 !important;
// }
</style>
